public class 课上习题 {
    public static void main(String[] args) {
        //数组创立
        int[] arr = {1, 2,3 };//静态数组
        int[] arr2 = new int[10];//创立了一个动态数组， 没赋值
    }

    public static void move(char pose1, char pose2) {
        System.out.print(pose1 + "->" + pose2);
        System.out.print(" ");
    }
    public static void heoi(int n, char pose1, char pose2, char pose3) {
        if (n == 1) {
            move(pose1, pose3);
            return;
        }else {
            heoi(n - 1, pose1, pose3, pose2);
            move(pose1, pose3);
            heoi(n - 1, pose2, pose1, pose3);
        }
    }
    public static void main1(String[] args) {
        //汉诺塔模型
        heoi(3, 'A', 'B', 'C');
    }
}
